Current Location: Home> Function Categories> min

min

Find the minimum value
Name:min
Category:math
Programming Language:php
One-line Description:Returns the minimum value.

Definition and usage

min() returns the minimum value.

Example

In this example, we will use min() to return the minimum value of the two specified numbers:

 <?php
echo ( min ( 5 , 7 ) ) ;
echo ( min ( - 3 , 5 ) ) ;
echo ( min ( - 3 , - 5 ) ) ;
echo ( min ( 7.25 , 7.30 ) ) ;
?>

Try it yourself

grammar

 min ( x , y )
parameter describe
x Required. A number.
y Required. A number.

illustrate

min() returns the smallest value in the parameter.

If there is only one parameter and is an array, min() returns the smallest value in the array. If the first parameter is an integer, string, or floating point number, at least two parameters are required and min() returns the smallest of these values. An infinite number of values ​​can be compared.

Similar Functions
  • Hyperbolic cosine cosh

    cosh

    Hyperboliccosine
  • Combined linear congruent generator lcg_value

    lcg_value

    Combinedlinearcongru
  • Perform floating point division under IEEE 754 semantics fdiv

    fdiv

    Performfloatingpoint
  • Calculate the index of e exp

    exp

    Calculatetheindexofe
  • Convert angle to radians deg2rad

    deg2rad

    Convertangletoradian
  • Determine whether it is a finite value is_finite

    is_finite

    Determinewhetheritis
  • Logarithm with base 10 log10

    log10

    Logarithmwithbase10
  • Find the maximum value max

    max

    Findthemaximumvalue